home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
TPRNTMID.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
45 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME TPRNTMID.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NBT1.INC"
COLOR 7, 0
CLS
? "┌──────────────────────────────────────────────────────────────────────────
? "│ TprintMid ( Row?, Col?, V$, MidPos%, Chars%, Attr? )
? "│ fTprintMid?? ( Row?, Col?, V$, MidPos%, Chars%, Attr? )
? "│ TprintMid2 ( Row?, Col?, V$, MidPos%, Mpos2%, Attr? )
? "│ fTprintMid2?? ( Row?, Col?, V$, MidPos%, Mpos2%, Attr? )
? "├──────────────────────────────────────────────────────────────────────────
? "│ TprintMid works like PowerBASIC's MID$ function while TprintMid2 works on
? "│ position to position.
? "│ The functions return the ROWCOL of the end of the printed text(s).
? "└──────────────────────────────────────────────────────────────────────────
Test$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ' test string
'
Tprint 12, 1, "The test string: " + Test$, 9 '
Tprint 14, 1, "TprintMid (14,25,T$,5,10,14) =", 7 '
TprintMid 14, 32, Test$, 5, 10, 14 ' 10 characters
'
Tprint 16, 1, "TprintMid2(16,25,T$,5,10,14) = ", 7 '
RowCol?? = fTprintMid2??( 16, 32, Test$, 5, 10, 14 ) ' 6 characters
'
Row? = ( RowCol?? \ 256 ) '
Col? = ( RowCol?? MOD 256 ) '
LOCATE Row?, Col?, 1, 15, 16 '
Tprint Row?, Col?, " the cursor is here.", 139 ' blink = Attr? + 128 )
' └─────────────────────────────> change attribute